<template>
  <!-- 其他信息说明 -->
  <div v-if="thisDiv === 3">
    <table>
      <slot name="left"/>
      <tr>
        <td class="td-title">处理后病人的情况</td>
        <td>{{ formData.eventMeasurement || '' }}</td>
      </tr>
      <tr>
        <td class="td-title">叙述整起事件经过</td>
        <td>{{ formData.eventDescription || '' }}</td>
      </tr>
      <tr>
        <td class="td-title">备注</td>
        <td>{{ formData.eventAffect || '' }}</td>
      </tr>
      <slot name="right"/>
    </table>
  </div>
  <div v-else style="display: flex; width: 100%; flex-wrap: wrap; ">
    <slot name="left"/>
    <el-form-item label="处理后病人的情况" prop="eventMeasurement" label-width="150px" style="width: 100%">
      <el-input
        :style="{ width: '100%' }"
        :rows="3"
        type="textarea"
        placeholder="请输入处理后病人的情况"
        v-model="formData.eventMeasurement"
      />
    </el-form-item>

    <el-form-item label="叙述整起事件经过" prop="eventDescription" label-width="150px" style="width: 100%">
      <el-input
        :style="{ width: '100%' }"
        :rows="3"
        type="textarea"
        placeholder="请输入叙述整起事件经过"
        v-model="formData.eventDescription"
      />
    </el-form-item>

    <el-form-item label="备注" prop="eventAffect" label-width="150px" style="width: 100%">
      <el-input
        :style="{ width: '100%' }"
        :rows="3"
        type="textarea"
        placeholder="请输入备注"
        v-model="formData.eventAffect"
      />
    </el-form-item>
    <slot name="right"/>
  </div>
</template>

<script>
export default {
  props: {
    formData: {
      type: Object,
      default: () => ({})
    },
    thisDiv: {
      type: Number,
      default: 1
    }
  }
}
</script>
<style scoped>
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  table-layout: fixed;
}
td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: left;
  /* 调整行间距 */
  line-height: 1.6;
  /* 调整字体大小 */
  font-size: 18px;
  /* 调整字间距 */
  letter-spacing: 0.5px;
}

.td-title {
  width: 12%;
  background-color: #fff;
}
</style>
